package priv.mk.test;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import java.util.Random;

@Configuration
@ComponentScan
public class Mconfig {
    @Bean
    public Person getperson(){
        return new Person("Jam",23);
    }
    @Bean
    public icpnFace getIconFace(){
        Random random = new Random();
        int num=random.nextInt(2);//Positive and negative
        if (num==0){
            return new Positive();
        }
        else return new Negative();
    }
}
